<template>
  <el-dialog :close-on-click-modal="false" title="设置等级" width="800px" :visible.sync="visible">
    <el-radio-group
      @change="e => radioChange(e)"
      v-model="radioValue"
      style="width: 100%"
      v-if="mdl.internalPlanItemList && mdl.internalPlanItemList.length > 0"
    >
      <el-col
        v-for="ite in mdl.internalPlanItemList[0].internalPlanLevelList"
        :key="ite.internalLevelId"
        :span="3"
      >
        <el-radio :label="ite.internalLevelId">{{ ite.internalLevelName }}</el-radio>
      </el-col>
    </el-radio-group>
    <div slot="footer">
      <el-button @click="visible = false">取消</el-button>
      <el-button type="primary" @click="handleSure">确定</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  data() {
    return {
      visible: false,
      radioValue: null,
      mdl: {}
    }
  },
  methods: {
    edit(item) {
      this.visible = true
      this.radioValue = null
      this.mdl = Object.assign({}, item)
    },
    handleSure() {
      this.visible = false
      this.$emit('setRadio', this.radioValue)
    },
    radioChange(e) {}
  }
}
</script>
